package com.ms.teapuesto.persistence.jpa;

import com.ms.teapuesto.model.Liga;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Set;
//import com.googlecode.genericdao.dao.jpa.GenericDAO;

/**
 * Created by RAZANERO on 27/08/14.
 */
public interface LigaRepository extends CrudRepository<Liga, String> {

    @Query("select  c " +
            " from Liga c"
    )
    public List<Liga> getLigaList();


    @Query("select  c " +
            " from Liga c where c.leagueId in :leagueId"
    )
    public List<Liga> getLigaListIn(@Param("leagueId") Set<String> leagueIdList);


}
